export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      {
        path: '/user',
        redirect: '/user/login',
      },
      {
        path: '/user/login',
        name: 'login',
        component: './User/Login',
      },
      // { path: '/user/register', name: 'register', component: './User/Register' },     //  后台管理系统不提供注册
      {
        path: '/user/register-result',
        name: 'register.result',
        component: './User/RegisterResult',
      },
      {
        component: '404',
      },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] },
      {
        path: '/dashboard',
        name: 'dashboard',
        icon: 'dashboard',
        routes: [
          {
            path: '/dashboard/analysis',
            name: 'analysis',
            component: './Dashboard/Analysis',
          },
          {
            path: '/dashboard/monitor',
            name: 'monitor',
            component: './Dashboard/Monitor',
          },
          {
            path: '/dashboard/workplace',
            name: 'workplace',
            component: './Dashboard/Workplace',
          },
        ],
      },
      // dashboard
      // 管理员列表
      {
        path: '/adminlist',
        icon: 'user',
        name: 'admin',
        authority: ['admin'],
        routes: [
          {
            path: '/adminlist/table-list',
            name: 'searchtable',
            component: './Admin/TableList',
          },
          {
            path: '/adminlist/edit/:id',
            name: 'editadmin',
            hideInMenu: true,
            component: './Admin/EditForm',
          },
          {
            path: '/adminlist/addadmin',

            name: 'addadmin',
            component: './Admin/BasicForm',
          },
        ],
      },
      // 用户管理列表
      {
        path: '/userlist',
        icon: 'user',
        name: 'userlist',
        authority: ['admin'],
        routes: [
          {
            path: '/userlist/table-list',
            name: 'searchtable',
            component: './UserList/TableList',
          },
          {
            path: '/userlist/adduser',
            name: 'adduser',
            component: './UserList/BasicForm',
          },
          {
            path: '/userlist/userinfo/:id',
            name: 'userinfo',
            hideInMenu: true,
            component: './UserList/BasicProfile',
          },
        ],
      }, // 用户管理列表
      {
        path: '/wxuserlist',
        icon: 'user',
        name: 'wxuserlist',
        authority: ['admin'],
        routes: [
          {
            path: '/wxuserlist/table-list',
            name: 'searchtable',
            component: './WxUserList/TableList',
            authority: ['admin'],
          },
          {
            path: '/wxuserlist/userinfo/:id',
            name: 'userinfo',
            hideInMenu: true,
            component: './WxUserList/BasicProfile',
            authority: ['admin'],
          },
          {
            path: '/wxuserlist/orderinfo/:orderid',
            name: 'orderinfo',
            hideInMenu: true,
            component: './WxUserList/OrderProfile',
            authority: ['admin'],
          },
        ],
      },
      {
        path: '/viplist',
        icon: 'user',
        name: 'viplist',
        authority: ['admin'],
        routes: [
          {
            path: '/viplist/table-list',
            name: 'searchtable',
            component: './VipWxUserList/TableList',
            authority: ['admin'],
          },
          {
            path: '/viplist/userinfo/:id',
            name: 'userinfo',
            hideInMenu: true,
            component: './VipWxUserList/BasicProfile',
            authority: ['admin'],
          },
          {
            path: '/viplist/orderinfo/:orderid',
            name: 'orderinfo',
            hideInMenu: true,
            component: './VipWxUserList/OrderProfile',
            authority: ['admin'],
          },
        ],
      },
      {
        path: '/shoplist',
        icon: 'shop',
        name: 'shoplist',
        authority: ['admin'],
        routes: [
          {
            path: '/shoplist/table-list',
            name: 'searchtable',
            component: './ShopList/TableList',
          },
          {
            path: '/shoplist/addshop',
            name: 'addshop',
            hideInMenu: true,
            component: './ShopList/BasicForm',
          },
          {
            path: '/shoplist/sort-list',
            name: 'sorttable',
            component: './ShopList/SortTableList',
          },
          {
            path: '/shoplist/addsort',
            name: 'addsort',
            hideInMenu: true,
            component: './ShopList/SortBasicForm',
          },
          {
            path: '/shoplist/editsort/:id',
            name: 'editsort',
            hideInMenu: true,
            component: './ShopList/SortEditForm',
          },
          {
            path: '/shoplist/shopdetails/:id',
            name: 'shopdetail',
            hideInMenu: true,
            component: './ShopList/BasicProfile',
          },
          {
            path: '/shoplist/edit-shop/:id',
            name: 'editshop',
            hideInMenu: true,
            component: './ShopList/EditForm',
          },
        ],
      },
      {
        path: '/votelist',
        icon: 'like',
        name: 'votelist',
        authority: ['admin'],
        routes: [
          {
            path: '/votelist/table-list',
            name: 'searchtable',
            component: './VoteList/TableList',
          },
          {
            path: '/votelist/votedetail/:id',

            name: 'votedetail',
            hideInMenu: true,
            component: './VoteList/BasicProfile',
          },
        ],
      },
      {
        name: 'account',
        icon: 'user',
        path: '/account',
        routes: [
          {
            path: '/account/center',
            name: 'center',
            component: './Account/Center/Center',
            routes: [
              {
                path: '/account/center',
                redirect: '/account/center/articles',
              },
              {
                path: '/account/center/articles',
                component: './Account/Center/Articles',
              },
              {
                path: '/account/center/applications',
                component: './Account/Center/Applications',
              },
              {
                path: '/account/center/projects',
                component: './Account/Center/Projects',
              },
            ],
          },
          {
            path: '/account/settings',
            name: 'settings',
            component: './Account/Settings/Info',
            routes: [
              {
                path: '/account/settings',
                redirect: '/account/settings/base',
              },
              {
                path: '/account/settings/base',
                component: './Account/Settings/BaseView',
              },
              {
                path: '/account/settings/security',
                component: './Account/Settings/SecurityView',
              },
              {
                path: '/account/settings/binding',
                component: './Account/Settings/BindingView',
              },
              {
                path: '/account/settings/notification',
                component: './Account/Settings/NotificationView',
              },
            ],
          },
        ],
      },
      {
        path: '/doclist',
        icon: 'file-word',
        name: 'doclist',
        authority: ['admin'],
        routes: [
          {
            path: '/doclist/adddoc',
            name: 'adddoc',
            component: './DocList/BasicForm',
          },
          {
            path: '/doclist/table-list',
            name: 'tablelist',
            component: './DocList/TableList',
          },
          {
            path: '/doclist/edit/:id',
            name: 'editdoc',
            hideInMenu: true,
            component: './DocList/EditForm',
          },
        ],
      },
      // {
      //   path: '/rulelist',
      //   icon: 'file-word',
      //   name: 'rulelist',
      //   authority: ['admin'],
      //   routes: [
      //     {
      //       path: '/rulelist/addrulesort',
      //       name: 'addrulesort',
      //       component: './RuleList/RuleSortForm',
      //     },
      //     {
      //       path: '/rulelist/addrule',
      //       name: 'addrule',
      //       component: './RuleList/BasicForm',
      //     },
      //     {
      //       path: '/rulelist/table-list',
      //       name: 'tablelist',
      //       component: './RuleList/TableList',
      //     },
      //     {
      //       path: '/rulelist/edit/:id',
      //       name: 'editrule',
      //       hideInMenu: true,
      //       component: './RuleList/EditForm',
      //     },
      //   ],
      // },
      {
        component: '404',
      },
    ],
  },
];
